#include <iostream>
#include <string>

using namespace std;


class my_class
{
private:
    int n;
    int * ptr;
public:
    my_class()
    {
        cout << "无参构造" << endl;
    }

    my_class(int n) : n(n)
    {
        cout << "有参构造" << endl;
        ptr = new int(n);
    }

    ~my_class()
    {
        if (ptr != nullptr)
        {
            delete ptr;
            cout << "析构释放成功" << endl;
            return ;
        }
        cout << "析构释放失败" << endl;
        
    }
};


class Student
{
private:
    // 成员子对象
    my_class c_1;
public:
    Student(/* args */)
    {
        
    }
    Student(int n) : c_1(n)
    {
        
    }
    ~Student()
    {

    }
};






int main(int argc, char const *argv[])
{
    
    Student S1;


    return 0;
}
